perm filename NOTES.BIN[LSP,JRA] blob
sn#091301 filedate 1974-03-12 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 ← Notes on getting the right bindings
C00005 ENDMK
C⊗;
← Notes on getting the right bindings
It is easy to see where bindings go wrong in LISP. It is diffucult to do so
in other languages.... of course it's difficult to see whether tthe
bindings are %2right%* in other languages.
Here are some introductory lossages:
.begin nofill; select 3;
%1define%* inc %1as%*
(INC(X)(SET X(ADD1(EVAL X)))) ..... %2NOT%* SETQ.
%1evaluate: %*(SETQ A 0) (INC (QUOTE A))%1 ....WIN.
%1evaluate: %3(SETQ X 0) (INC (QUOTE X))%1 ....LOSE BIG
%1 or try:%*
wrong <%4f%*= λ[[x]prog[[y]
y ← 2;
return[eval[car[x]]]]]
y←0;
wrong[y];
%1 isn't this fun !!!
try:%*
right <%4f%*= λ[[x;a]prog[[y]
y←2;
return[eval[car[x];a]]]]
right[y];
%1
So %3FEXPR%*s can be defined with an optional second arg. If so defined,
the symbol table %2at the point of call%* is bound to it.
more on binding:
one of the main reasons for local variables is to avoid collision
perhaps we should outlaw globals...lossage since function names
are usually global....c.f. hackery in notes on LISP1.85 (sec 7 compilation and
globals) such that functions are "different" ... bletchery.
compare compiler which uses function names which conflict with a function
which user has ...big lossage ....therefore mulitple symbol tables
under system and user control
debugging ...breaking s.t. locals are seen
interrputs ...a la CONNIVER MACLISP
.end